package com.bm.specialvehiclefordispatcher.logics;

import com.bm.corelibs.logic.BaseLogic.NListener;
import com.bm.specialvehiclefordispatcher.bean.BaseData;
import com.bm.specialvehiclefordispatcher.constants.Urls;

public class AdManager extends BaseManager {

	public void getAds(NListener<BaseData> l) {

		logic.edit().resetAll().addParam("position","2").setBaseClass(BaseData.class).setListener(l).setUrl(Urls.GET_AD);
		logic.doPost();
//		 BaseData baseData = new BaseData();
//		 baseData.status = Constant.STATUS_OK;
//		 MapData mapData = new MapData();
//		
//		 List<RecommendAd> ads = new ArrayList<RecommendAd>();
//		 ads.add(new
//		 RecommendAd("https://d13yacurqjgara.cloudfront.net/users/109605/screenshots/2152255/lion.png",
//		 ""));
//		 ads.add(new
//		 RecommendAd("https://d13yacurqjgara.cloudfront.net/users/10009/screenshots/2152900/ffp_c.jpg",
//		 ""));
//		 ads.add(new
//		 RecommendAd("https://d13yacurqjgara.cloudfront.net/users/2973/screenshots/2152754/drinking.jpg",
//		 ""));
//		
//		 mapData.ad = ads;
//		 baseData.data = mapData;
//		 l.onResponse(baseData);
	}
	
	public void getImage(NListener<BaseData> listener){
		logic.edit().resetAll().addParam("position", "0")
		.setBaseClass(BaseData.class).setListener(listener)
		.setUrl(Urls.GET_AD);
		logic.doPost();
	}

}
